package
{
	import flash.utils.Dictionary;

	public class LangFile
	{
		private var lang = Registry.mainLang;
		public var en_us_Dictionary = new Dictionary();
		public var gr_Dictionary = new Dictionary();
		
		public function LangFile()
		{
			Registry.initDB();
			Registry.getOptions();
			lang = Registry.mainLang;
			//constructor
			lang=='gr'?LangFileInit_GR(): LangFileInit_EN();  //Initialize dictionaries
		}
		
		public function LangFileInit_GR()
		{
			gr_Dictionary['posted']		= "Αναρτήθηκε πρίν από ";
			gr_Dictionary['minutes']	= " λεπτά";
			gr_Dictionary['hours']		= " ώρες";
			gr_Dictionary['days']		= " μέρες";
			gr_Dictionary['months']		= " μήνες";
			gr_Dictionary['years']		= " χρόνια";
			gr_Dictionary['exitLabel']  = "Έξοδος";
		}
		
		public function LangFileInit_EN()
		{
			en_us_Dictionary['posted']		= "Posted ";
			en_us_Dictionary['minutes']		= " minutes ago";
			en_us_Dictionary['hours']		= " hours ago";
			en_us_Dictionary['days']		= " days ago";
			en_us_Dictionary['months']		= " months ago";
			en_us_Dictionary['years']		= " years ago";
			en_us_Dictionary['exitLabel']	= "Exit";
		}
		
		
		function getGreek()
		{
			return gr_Dictionary();
		}
		
		public function getLabel(value)
		{
			if(lang=="en")
				return en_us_Dictionary[value];
			else if(lang=="gr")
				return gr_Dictionary[value];
			
		}
	}
}